<template>
  <div id="root">
    <div class="page-wrapper">
      <div class="video-background">
        <video autoplay muted loop playsinline>
          <source :src="videoSrc" type="video/mp4">
        </video>
        <!--<video-player class="vjs-custom-skin"-->
                      <!--:options="playerOptions"-->
                      <!--@ready="playerReadied">-->
        <!--</video-player>-->
      </div>
      <Header></Header>
      <MenuBar></MenuBar>
      <router-view/>
    </div>
  </div>
</template>

<script>
// import videojs from 'video.js'
// import 'vue-video-player/src/custom-theme.css'
// import 'video.js/dist/video-js.css'
import Header from '@/components/layout/Header'
import MenuBar from '@/components/layout/MenuBar'
// window.videojs = videojs

// hls plugin for videojs6
// require('videojs-contrib-hls/dist/videojs-contrib-hls.js')

export default {
  data () {
    return {
      videoSrc: 'http://demo-dev.sadpu.com/uploads/media/bg-temp.mp4',
      playerOptions: {
        autoplay: true,
        controls: false,
        loop: true,
        preload: 'auto',
        height: '1080',
        sources: [{
          type: 'video/mp4',
          src: '/static/media/bg-temp.mp4'
        }],
        poster: '../assets/bg-temp.png'
      }
    }
  },
  components: {
    'MenuBar': MenuBar,
    'Header': Header
  },
  created () {
    if (this.visible) {
      this.isOpen = true
    }
  }
}
</script>

<style lang="scss">
.video-background{
  position: absolute;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  left: 0;
  top: 0;
  z-index: -1;
  video{
    width: 1920px;
  }
}
html,
body {
  width: 100%;
  height: 100%;
}
input::-ms-clear,
input::-ms-reveal {
  display: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-family: sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -ms-overflow-style: scrollbar;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@-ms-viewport {
  width: device-width;
}
article,
aside,
dialog,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section {
  display: block;
}
body {
  margin: 0;
  color: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  font-variant: tabular-nums;
  line-height: 1.5;
  background-color: #fff;
  font-feature-settings: 'tnum';
}
[tabindex='-1']:focus {
  outline: none !important;
}
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: rgba(0, 0, 0, 0.85);
  font-weight: 500;
}
p {
  margin-top: 0;
  margin-bottom: 1em;
}
abbr[title],
abbr[data-original-title] {
  text-decoration: underline;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
  border-bottom: 0;
  cursor: help;
}
address {
  margin-bottom: 1em;
  font-style: normal;
  line-height: inherit;
}
input[type='text'],
input[type='password'],
input[type='number'],
textarea {
  -webkit-appearance: none;
}
ol,
ul,
dl {
  margin-top: 0;
  margin-bottom: 1em;
}
ol ol,
ul ul,
ol ul,
ul ol {
  margin-bottom: 0;
}
dt {
  font-weight: 500;
}
dd {
  margin-bottom: 0.5em;
  margin-left: 0;
}
blockquote {
  margin: 0 0 1em;
}
dfn {
  font-style: italic;
}
b,
strong {
  font-weight: bolder;
}
small {
  font-size: 80%;
}
sub,
sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
a {
  color: #1890FF;
  text-decoration: none;
  background-color: transparent;
  outline: none;
  cursor: pointer;
  transition: color 0.3s;
  -webkit-text-decoration-skip: objects;
}
a:focus {
  text-decoration: underline;
  -webkit-text-decoration-skip: ink;
          text-decoration-skip-ink: auto;
}
a:hover {
  color: #40a9ff;
}
a:active {
  color: #096dd9;
}
a:active,
a:hover {
  text-decoration: none;
  outline: 0;
}
a[disabled] {
  color: rgba(0, 0, 0, 0.25);
  cursor: not-allowed;
  pointer-events: none;
}
pre,
code,
kbd,
samp {
  font-size: 1em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
pre {
  margin-top: 0;
  margin-bottom: 1em;
  overflow: auto;
}
figure {
  margin: 0 0 1em;
}
img {
  vertical-align: middle;
  border-style: none;
}
svg:not(:root) {
  overflow: hidden;
}
a,
area,
button,
[role='button'],
input:not([type='range']),
label,
select,
summary,
textarea {
  touch-action: manipulation;
}
table {
  border-collapse: collapse;
}
caption {
  padding-top: 0.75em;
  padding-bottom: 0.3em;
  color: rgba(0, 0, 0, 0.45);
  text-align: left;
  caption-side: bottom;
}
th {
  text-align: inherit;
}
input,
button,
select,
optgroup,
textarea {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}
button,
input {
  overflow: visible;
}
button,
select {
  text-transform: none;
}
button,
html [type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
  padding: 0;
  border-style: none;
}
input[type='radio'],
input[type='checkbox'] {
  box-sizing: border-box;
  padding: 0;
}
input[type='date'],
input[type='time'],
input[type='datetime-local'],
input[type='month'] {
  -webkit-appearance: listbox;
}
textarea {
  overflow: auto;
  resize: vertical;
}
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
legend {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.5em;
  padding: 0;
  color: inherit;
  font-size: 1.5em;
  line-height: inherit;
  white-space: normal;
}
progress {
  vertical-align: baseline;
}
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
  height: auto;
}
[type='search'] {
  outline-offset: -2px;
  -webkit-appearance: none;
}
[type='search']::-webkit-search-cancel-button,
[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}
::-webkit-file-upload-button {
  font: inherit;
  -webkit-appearance: button;
}
output {
  display: inline-block;
}
summary {
  display: list-item;
}
template {
  display: none;
}
[hidden] {
  display: none !important;
}
mark {
  padding: 0.2em;
  background-color: #feffe6;
}
::selection {
  color: #fff;
  background: #1890FF;
}
.clearfix {
  zoom: 1;
}
.clearfix::before,
.clearfix::after {
  content: '';
  display: table;
}
.clearfix::after {
  clear: both;
}

.site-base-bg{
  background-color: rgba($color: #071829, $alpha: 0.7);
  &::before{
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    background-color: rgba($color: #294d73, $alpha: 0.6);
    z-index: -1;
  }
}
.page-wrapper {
  position: relative;
  width: 1920px;
  height: 1080px;
  /*background: url(./assets/bg-temp.png) no-repeat;*/
  margin: 0 auto;
}
.bimicon{
  width: 24px;
  height: 16px;
  display: inline-block;
  margin: -3px 0 0;
  vertical-align: middle
}

.line-block-placeholder{
  position: relative;
  border: 3px solid rgba($color: #08121b, $alpha: 0.8) {
    left: none;
    right: none;
  }
  height: 15px;
  &::before, &::after{
    position: absolute;
    content: '';
    width: 100%;
    border-bottom: 2px solid rgba($color: #45678a, $alpha: 0.8)
  }
  &::after{
    bottom: -5px;
  }
}

$drawer-prefix-cls: 'bim-drawer';

.#{$drawer-prefix-cls}{
  position: fixed;
  top: 0;
  width: 0%;
  height: 1030px;
  margin-top: 50px;
  overflow: hidden;
  z-index: 1000;
  &-left,
  &-right{
    position: absolute;
    width: 0%;
    height: 1030px;
    transition: transform 0.3s cubic-bezier(0.9, 0, 0.3, 0.7);
    .#{$drawer-prefix-cls} {
      &-content-wrapper{
        position: relative;
        width: 100%;
        height: 100%;
        border-bottom: 2px solid #537393;
        z-index: 1;
      }
    }
  }
  &-content{
    width: 100%;
    height: 100%;
  }
  &-left{
    width: 280px;
    left: 0;
    transform: translateX(-100%);
    .#{$drawer-prefix-cls} {
      &-content-wrapper{
        border-right: 3px solid #537393;
        padding: 50px 54px 50px 55px;
        height: 360px;
        margin-top: 260px;
      }
    }
  }
  &-right{
    width: 675px;
    right: 0;
    transform: translateX(100%);
    .#{$drawer-prefix-cls} {
      &-content-wrapper{
        border-left: 3px solid #537393;
        padding: 35px 60px 0 50px;
      }
    }
  }
  &.#{$drawer-prefix-cls}-open{
    width: 1920px;
    .#{$drawer-prefix-cls}-left,
    .#{$drawer-prefix-cls}-right {
      transform: translateX(0);
    }
    .#{$drawer-prefix-cls} {
      &-mask{
        opacity: 0.1;
        height: 1030px;
        animation: bimDrawerFadeIn 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
        transition: none;
      }
    }
  }
  &-mask{
    position: absolute;
    width: 100%;
    height: 0;
    opacity: 0;
    background-color: #487cae;
    transition: opacity 0.3s linear, height 0s ease 0.3s;
  }
}
.main-sidebar-drawer{
  height: 258px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.video-monitor{
  margin-bottom: 10px;
}
.header-block{
  border-bottom: 2px solid rgba($color: #45678a, $alpha: 0.8);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  line-height: 1;
  padding: 12px 0;
}
.box-title{
  color: #cde9ff;
  font-size: 30px;
  font-weight: normal;
  margin: 0;
}
.danger-badge{
  color: #a7c7e1;
  font-size: 20px;
  b{
    color: #e24b33;
  }
}
.video-stream{
  margin: 42px 26px;
  border: 3px solid #bcd0e5;
  background-color: #304c67;
  padding: 2px;
  video{
    width: 100%;
  }
}
.vjs-poster{
  height: auto;
  top: 3px;
  right: 3px;
  bottom: 3px;
  left: 3px;
  background-size: 220px auto!important;
}
.stream-button-group{
  border-top: 2px solid  rgba($color: #415d79, $alpha: 0.8);
  padding-top: 15px;
  height: 66px;
  margin-bottom: 10px;
  button{
    width: 150px;
    height: 40px;
    border: 2px solid #6581a4;
    background-color: transparent;
    font-size: 20px;
    margin-right: 30px;
    color: #c7dcec;
    cursor: pointer;
    display: inline-block;
    outline: none;
  }
}
.slider-wrap{
  // overflow: hidden;
  // overflow-x: scroll;
  width: 100%;
  height: 100%;
  &::-webkit-scrollbar{
    height: 4px;
  }
  &::-webkit-scrollbar-thumb{
    background-color: #637e9b;
    box-shadow: inset 1px 0 0 #7a97b5, 2px 0 0 #132538
  }
  &::-webkit-scrollbar-track{
    background-color: rgba($color: #0e2134, $alpha: 0.6);
  }
}
.slider-navItems{
  white-space: nowrap;
  font-size: 0;
}
.alarm-messages{
  overflow: auto;
  margin: 25px 0;
  &.layout-home{
    height: 360px;
  }
  &.layout-door{
    height: 340px;
  }
  &.layout-info{
    height: 824px;
  }
  &::-webkit-scrollbar{
    width: 8px;
  }
  &::-webkit-scrollbar-track{
    background-color: rgba($color: #0e2134, $alpha: 0.6)
  }
  &::-webkit-scrollbar-thumb{
    background-color: #637e9b;
    box-shadow: inset 0 1px 0 0 #7a97b5, 0 2px 0 0 #132538
  }
  &::-webkit-scrollbar-button:start:decrement,
  &::-webkit-scrollbar-button:end:increment {
    display: block;
  }
  /*&::-webkit-scrollbar-button:vertical:start:increment,*/
  /*&::-webkit-scrollbar-button:vertical:end:decrement{*/
    /*display: block;*/
    /*background-color: #000*/
  /*}*/
  &::-webkit-scrollbar-button:start:decrement,
  &::-webkit-scrollbar-button:end:increment{
    background-color: rgba($color: #0e2134, $alpha: 0.6)
  }
  /*&::-webkit-scrollbar-track-piece:vertical:start{*/
    /*background-color: #f00*/
  /*}*/
  /*&::-webkit-scrollbar-track-piece:vertical:end{*/
    /*background-color: #0f0*/
  /*}*/
  /*&::-webkit-scrollbar-thumb:vertical{*/
    /*background-color: #0ff*/
  /*}*/
}
.alarm-meta{
  border-bottom: 2px solid rgba($color: #415d79, $alpha: 0.8);
  display: flex;
  padding: 0 20px 28px 0;
  align-items: center;
  & + &{
    margin-top: 30px;
  }
  &:last-child{
    border-bottom: none;
  }
  &-detail{
    flex: 1;
  }
  &-title{
    font-size: 22px;
    color: #b5d3ea;
    font-weight: normal;
    margin: 0;
  }
  &-description{
    font-size: 18px;
    color: #617f97;
    margin-top: 12px;
  }
  &-opt{
    margin-top: 28px;
    .bim-btn{
      margin-right: 26px;
      &:last-child{
        margin-right: 0;
      }
    }
  }
  &-pic{
    width: 218px;
    // padding-right: 25px;
    background-color: #132436;
    border: 2px solid #7e9fc2;
    padding: 2px;
    overflow: hidden;
    &:hover{
      img{
        transform: scale(1.05);
      }
    }
    img {
      width: 210px;
      height: 118px;
      display: block;
      transition: transform .5s ease;
    }
  }
}
.bim-btn{
  position: relative;
  transition: all .3s cubic-bezier(.645, .045, .355, 1);
  user-select: none;
  cursor: pointer;
  touch-action: manipulation;
  background-color: rgba($color: #294c71, $alpha: 0.8);
  border: 0 none;
  color: #cde9ff;
  font-size: 18px;
  box-shadow: inset 1px 1px 0 0 rgba($color: #4c7096, $alpha: 0.8), inset -1px -1px 0 0 rgba($color: #466b96, $alpha: 0.8), 6px 6px 0 0 rgba($color: #112235, $alpha: 0.8);
  border-radius: 0 2px;
  &:active, &:focus{
    outline: 0;
  }
  &:active{
    animation: wave 1s infinite linear alternate;
    // transform: scale(1)
    // background-color: rgba($color: #112235, $alpha: 0.8);
    // box-shadow: 6px 6px 0 0 rgba($color: #294c71, $alpha: 0.8);
  }
  .main-sidebar-drawer &{
    width: 168px;
    height: 50px;
    text-align: left;
    padding-left: 35px;
    & + .bim-btn {
    margin-top: 20px;
    }
  }
  &-handle, &-ignore, &-scene{
    width: 78px;
    height: 36px;
  }
  &-handle[disabled], &-ignore[disabled], &-scene[disabled]{
    background-color: #334558;
    box-shadow: inset 1px 1px 0 0 #3d556f, inset -1px -1px 0 0 rgba($color: #17293d, $alpha: 0.24), 4px 4px 0 0 rgba(17, 34, 53, 0.8);
    cursor: not-allowed;
  }
  &-send{
    width: 168px;
    height: 50px;
    box-shadow: inset 1px 1px 0 0 rgba(76, 112, 150, 0.8), inset -1px -1px 0 0 rgba(70, 107, 150, 0.8), 4px 4px 0 0 rgba(17, 34, 53, 0.8);
  }
}
.bim-dialog{
  border: 3px solid #bcd0e5;
  .el-dialog__header{
    display: none;
  }
  .el-dialog__body{
    padding: 0;
  }
}
@keyframes wave {
  0% {
    box-shadow: inset 1px 1px 0 0 rgba($color: #4c7096, $alpha: 0.8), inset -1px -1px 0 0 rgba($color: #466b96, $alpha: 0.8), 6px 6px 0 0 rgba($color: #112235, $alpha: 0.8);
  }
  25% {
    box-shadow: inset 1px 1px 0 0 rgba($color: #4c7096, $alpha: 0.8), inset -1px -1px 0 0 rgba($color: #466b96, $alpha: 0.8), 3px 3px 0 0 rgba($color: #112235, $alpha: 0.8);
  }
  50% {
    box-shadow: inset 1px 1px 0 0 rgba($color: #4c7096, $alpha: 0.8), inset -1px -1px 0 0 rgba($color: #466b96, $alpha: 0.8), 0 0 0 0 rgba($color: #112235, $alpha: 0.8);
  }
  75% {
    box-shadow: inset 1px 1px 0 0 rgba($color: #4c7096, $alpha: 0.8), inset -1px -1px 0 0 rgba($color: #466b96, $alpha: 0.8), -3px -3px 0 0 rgba($color: #112235, $alpha: 0.8);
  }
  100% {
    box-shadow: inset 1px 1px 0 0 rgba($color: #4c7096, $alpha: 0.8), inset -1px -1px 0 0 rgba($color: #466b96, $alpha: 0.8), -6px -6px 0 0 rgba($color: #112235, $alpha: 0.8);
  }
}
@keyframes bimDrawerFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.08;
  }
}
.bim-pager{
  display: flex;
  justify-content: center;
  align-items: center;
  li{
    background-color: rgba(#45678a, 0.4)!important;
    color: #93c0e3!important;
    &.active{
      background-color: #4a6c90!important;
      color: #cde9ff!important;
    }
    &:not(.disabled):hover{
      color: #cde9ff!important;
    }
  }
  .btn-prev,
  .btn-next{
    background-color: rgba(#45678a, 0.4)!important;
    color: #93c0e3!important;
    padding: 0 12px!important;
    &:disabled{
      color: #a0a0a0!important;
    }
  }
}
</style>
